package com.wld.blacklist.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wld.blacklist.mapper.ArticleMapper;
import com.wld.blacklist.dao.entity.Article;
import com.wld.blacklist.service.ArticleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 文章接口实现类
 * @author ludiWang
 * @version 1.0.0
 * @date 2022年3月2日 10:10:55
 */
@Slf4j
@Service
public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article> implements ArticleService {
    private ArticleMapper articleMapper;
    @Autowired
    public ArticleServiceImpl(ArticleMapper articleMapper){
        this.articleMapper = articleMapper;
    }

    /**
     * 查询
     * @param title 文章标题
     * @param industryInvolved 行业分类
     * @return 文章集合
     */
    @Override
    public List<Map<String, Object>> query(IPage iPage,String title,String industryInvolved){;
        return articleMapper.findByCondition(iPage,title,industryInvolved);
    }
}
